//
//  BroPaiHangCollectionViewCell.m
//  HimalayaMusic
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 WXCLegendary. All rights reserved.
//

#import "BroPaiHangCollectionViewCell.h"

@implementation BroPaiHangCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        self.leftImageView = [[UIImageView alloc] init];
        [self addSubview:_leftImageView];
//        self.leftImageView.backgroundColor = [UIColor redColor];
        
        self.programNameLabel = [[UILabel alloc] init];
//        self.programNameLabel.backgroundColor = [UIColor greenColor];
        [self addSubview:_programNameLabel];
//        self.programNameLabel.textColor = [UIColor lightGrayColor];
//        self.programNameLabel.font = [UIFont systemFontOfSize:12];
        
        self.rnameLabel = [[UILabel alloc] init];
//        self.rnameLabel.backgroundColor = [UIColor purpleColor];
        [self addSubview:_rnameLabel];
        self.rnameLabel.textColor = [UIColor lightGrayColor];
        self.rnameLabel.font = [UIFont systemFontOfSize:12];

        
        self.radioPlayCountLabel = [[UILabel alloc] init];
//        self.radioPlayCountLabel.backgroundColor = [UIColor brownColor];
        [self addSubview:_radioPlayCountLabel];
        self.radioPlayCountLabel.textColor = [UIColor lightGrayColor];
        self.radioPlayCountLabel.font = [UIFont systemFontOfSize:12];

        
        
    }
    
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
 
    
    self.leftImageView.frame = CGRectMake(15, 5, self.width/5, self.height - 10);
    

    self.programNameLabel.frame = CGRectMake(15 + self.width/5 +10, 5, 200, 30);
    
    self.rnameLabel.frame = CGRectMake(self.programNameLabel.origin.x, self.programNameLabel.origin.y + self.programNameLabel.height, 200, 30);
    
    self.radioPlayCountLabel.frame = CGRectMake(self.programNameLabel.origin.x, _rnameLabel.origin.y+_rnameLabel.height, 200, 30);
    
    
    
}
@end
